package cn.xuchunh.campusbbs.storage.sqlite;

/**
 * Created by XuChunH on 2015/10/28.
 */
public interface DataBaseConstant {

    String TABLE_REPLY_DETAIL = "reply_detail";
    String TABLE_LOGINED_USER = "logined_user";

    String COLUMN_ID = "_id";
    String COLUMN_REPLY_ID = "reply_id";
    String COLUMN_REPLY_CONTENT = "reply_content";
    String COLUMN_TOPIC_ID = "topic_id";
    String COLUMN_USER_NAME = "user_name";
    String COLUMN_USER_ID = "user_id";
    String COLUMN_USER_AVATAR = "avatar";

    String CREATE_REPLY_DETAIL = "CREATE TABLE IF NOT EXISTS "
            + TABLE_REPLY_DETAIL
            + " ("
            + COLUMN_ID + " integer primary key autoincrement,"
            + COLUMN_TOPIC_ID + " integer not null,"
            + COLUMN_REPLY_ID + " integer not null UNIQUE,"
            + COLUMN_REPLY_CONTENT + " text not null)";

    String CREATE_LOGINED_USER = "CREATE TABLE IF NOT EXISTS "
            + TABLE_LOGINED_USER
            + " ("
            + COLUMN_ID + " integer primary key autoincrement,"
            + COLUMN_USER_NAME + " text not null UNIQUE,"
            + COLUMN_USER_ID + " integer,"
            + COLUMN_USER_AVATAR + " text)";

}
